Improve the performance of table-extraction by judging whether to do …#4796
Closed
monchin wants to merge 1 commit into
Closed
Improve the performance of table-extraction by judging whether to do …#4796monchin wants to merge 1 commit into
monchin wants to merge 1 commit into
Conversation
…"make_chars" or "make_edges" by checking strategy
Contributor
|
I have read the CLA Document and I hereby sign the CLA Chuang Men seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…"make_chars" or "make_edges" by checking strategy
Motivation
Hello, I used viztracer to do some table-extraction tests, and found that
make_charsandmake_edgeswould always be run whatever the strategy is, which would waste a lot time. So I change the code to runmake_charsonly if the strategies include "text" and runmake_edgesonly if the strategies include "lines"/"lines_strict"Below is my test code
From the

result.json(checked by "vizviewer result.json"), we can see the performance improves a lot when "lines" and "text" strategies do not appear simultaneously."result.json" is too large to upload, so I paste a picture here. Old
find_tablescosts about 190ms and newfind_tablescosts about 101ms when both using default "lines" strategy.